module.exports = loginModule => {
  loginModule.controller('loginCtrl', ($rootScope, $scope, $state, loginService, Config) => {
    $scope.logIn = () => {
      let promise = loginService.refresh(Config.pageSize);
      promise.then(response => {
        console.log(response);
        $state.go('dashboard');
      }, error => {
        console.log(error);
      });
    };
  });
};
